package com.kly.user.enums;

public enum ConstellationEnums {
    AQUARIUS(1, "Aquarius", "", "水瓶座"),
    PISCES(2, "Pisces", "", "双鱼座"),
    ARIES(3, "Aries", "", "白羊座"),
    TAURUS(4, "Taurus", "", "金牛座"),
    GEMINI(5, "Gemini", "", "双子座"),
    CANCER(6, "Cancer", "", "巨蟹座"),
    LEO(7, "Leo", "", "狮子座"),
    VIRGO(8, "Virgo", "", "处女座"),
    LIBRA(9, "Libra", "", "天秤座"),
    SCORPIO(10, "Scorpio", "", "天蝎座"),
    SAGITTARIUS(11, "Sagittarius", "", "射手座"),
    CAPRICORN(12, "Capricorn", "", "摩羯座");

    private final int id;
    private final String name;
    private final String icon;
    private final String chineseName;

    ConstellationEnums(int order, String name, String icon, String chineseName) {
        this.id = order;
        this.name = name;
        this.icon = icon;
        this.chineseName = chineseName;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getChineseName() {
        return chineseName;
    }

    public String getIcon() {
        return icon;
    }

    public static ConstellationEnums getZodiacById(int id) {
        for (ConstellationEnums constellation : ConstellationEnums.values()) {
            if (constellation.getId() == id) {
                return constellation;
            }
        }
        throw new IllegalArgumentException("Invalid constellation id: " + id);
    }
}
